Skip to content

finish assigment#20

Open
beza102 wants to merge 1 commit intogrc-cohort-21:mainfrom
beza102:main
Open

finish assigment#20
beza102 wants to merge 1 commit intogrc-cohort-21:mainfrom
beza102:main

Conversation

@beza102
Copy link
Copy Markdown

@beza102 beza102 commented Jan 16, 2025

completed

Copy link
Copy Markdown

@auberonedu auberonedu left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Nice job! However, in the future I need to see multiple small commits made as you're working, otherwise you won't receive credit.

Comment thread src/ListPractice.java
Comment on lines +29 to +35
System.out.println("\nTraditional for-loop:");
for (int i = 0; i < stringList.size(); i++) {
System.out.println("Index " + i + ": " + stringList.get(i));
}
// Sort the list using the Collections library

Collections.sort(stringList);
System.out.println("\nSorted list: " + stringList);
Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Here and elsewhere the indentation is a bit off. Make sure to realign your code to make it easier to read

Comment thread src/StringPractice.java
}
// Create an ArrayList of Strings and assign it to a variable

ArrayList<String> stringList = new ArrayList<>();
Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Remember to use interface types where appropriate (List)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants